package vip.shuai7boy.util

import org.apache.commons.pool2.impl.GenericObjectPoolConfig
import redis.clients.jedis.JedisPool

/***
 * Redis管理类
 */
object RedisClient extends Serializable {

  val redisHost = "tuge1"
  val redisPort = 6379
  val redisTimeOut = 40000

  /**
   * JedisPool是一个连接池，既可以保证线程安全，又提高了并行度
   */
  lazy val pool = new JedisPool(new GenericObjectPoolConfig(), redisHost, redisPort, redisTimeOut)
}
